<?php
namespace Home\Controller; 
use Think\Controller;
class CacheController extends Controller{
	
	private $caches = array(
		'Cache' , 'Data' , 'Logs' , 'Temp'
    );
	/**
     * 缓存信息
     * @return
     */
    public function index(){ 
        $this->display();
    }
    /**
     * 删除缓存
     * @return
     */
    public function doclear() {
        foreach ($this->caches as $cache) {
			P(RUNTIME_PATH.$cache.' &nbsp;&nbsp;->Del OK' ,false);
        	del_dir_or_file( RUNTIME_PATH.$cache ); 
        }  
        return $this->success('成功删除缓存文件！','',3);
    }
	
}